﻿CREATE PROCEDURE [acms].[PostControl_GetAllBySiteIdAndTypeName]
	@SiteId int, 
	@TypeName varchar(50)
AS
	SELECT a.*
	FROM [acms].[PostControl_View] a
		inner join [acms].[Post_View] b on a.[PostId] = b.Id
	Where 
		a.TypeName = @TypeName
		and b.SiteId = @SiteId
RETURN 0;